// game_rock.js

let playerAction = process.argv[process.argv.length - 1];

const random = Math.random() * 3;

let computerAction = '';

if (random < 1) {
    computerAction = 'rock';
} else if (random > 2) {
    computerAction = 'scissor';
} else {
    computerAction = 'paper';
}

if (computerAction == playerAction) {
    console.log('平局');
} else if (
    computerAction == '' && playerAction == ''
    || computerAction == '' && playerAction == ''
) {} else {}